﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SignalR.Hubs;
using System.Text;

namespace OPLWeb.Classes
{
    [HubName("broadcastHub")]
    public class BroadCastHub : Hub
    {
        public void Send(string message, string sessnId, bool append)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<li><a href='javascript:void(0);'><span class='cl-main'><span class='span-h5'>Test says..</span><span></span><div class='newscontent' style='margin-left: 202px; display: none;'>");
            sb.Append(message);
            sb.Append("</div><span>");
            sb.Append(DateTime.Now.ToString());
            sb.Append("</span></span></a></li>");
            Clients.addMessage(sb.ToString(), sessnId, append);
        }

        public void MoveShape(int x, int y)
        {
            Clients.shapeMoved(Context.ConnectionId, x, y);
        }
    }
}